import request from '@/utils/request'

// 查询住户列表
export function listHousehold(data) {
  return request({
    url: '/household/listHousehold',
    method: 'post',
      data: data
  })
}

// 查询住户详细
export function getHousehold(id) {
  return request({
    url: '/household/getHouseholdById?id=' + id,
    method: 'get'
  })
}

// 新增住户
export function addHousehold(data) {
  return request({
    url: '/household/addHousehold',
    method: 'post',
    data: data
  })
}

// 修改住户
export function updateHousehold(data) {
  return request({
    url: '/household/editHousehold',
    method: 'post',
    data: data
  })
}

// 删除住户
export function delHousehold(id) {
  return request({
    url: '/household/delHousehold?ids=' + id,
    method: 'delete'
  })
}


// 批量分组设备
export function setGroupByIds(data) {
  return request({
    url: '/household/setGroupByIds',
    method: 'post',
    data: data
  })
}
